<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
  <title>Vega Scaffold</title>
  <script src="http://d3js.org/d3.v3.min.js"></script>
  <script src="http://trifacta.github.com/vega/vega.js"></script>
  <!--<script src="http://trifacta.github.com/vega/d3.geo.projection.min.js"></script>-->
</head>
<body>
<div id="vis"></div>

<script type="text/javascript">
// parse a spec and create a visualization view
function parse(spec) {
  vg.parse.spec(spec, function(chart) { chart({el:"#vis"}).update(); });
}
  parse(JSON.parse('{\
  "width": 300,\
  "height": 550,\
  "data": [\
    {\
      "name": "table",\
      "values": [\
          {"dir":"0.9.12", "test":"Accessing float series via object series", "value":9948}, {"dir":"1.0.0", "test":"Accessing float series via object series", "value":2}, {"dir":"1.1.1-beta", "test":"Accessing float series via object series", "value":2}, {"dir":"0.9.12", "test":"Building a large (1M items) series from two arrays", "value":1171}, {"dir":"1.0.0", "test":"Building a large (1M items) series from two arrays", "value":10}, {"dir":"1.1.1-beta", "test":"Building a large (1M items) series from two arrays", "value":630}, {"dir":"0.9.12", "test":"Creating large (10k) series from array", "value":803}, {"dir":"1.0.0", "test":"Creating large (10k) series from array", "value":141}, {"dir":"1.1.1-beta", "test":"Creating large (10k) series from array", "value":39}, {"dir":"0.9.12", "test":"Creating small (10) series from array", "value":1840}, {"dir":"1.0.0", "test":"Creating small (10) series from array", "value":629}, {"dir":"1.1.1-beta", "test":"Creating small (10) series from array", "value":320}, {"dir":"0.9.12", "test":"Diff 20x10k frame by offset 10", "value":6704}, {"dir":"1.0.0", "test":"Diff 20x10k frame by offset 10", "value":36}, {"dir":"1.1.1-beta", "test":"Diff 20x10k frame by offset 10", "value":46}, {"dir":"1.1.1-beta", "test":"Drop sparse columns from a large frame", "value":3}, {"dir":"1.1.1-beta", "test":"Drop sparse columns from a small frame", "value":5}, {"dir":"0.9.12", "test":"Drop sparse rows from a large frame", "value":255}, {"dir":"1.0.0", "test":"Drop sparse rows from a large frame", "value":173}, {"dir":"1.1.1-beta", "test":"Drop sparse rows from a large frame", "value":81}, {"dir":"0.9.12", "test":"Drop sparse rows from a small frame", "value":9}, {"dir":"1.0.0", "test":"Drop sparse rows from a small frame", "value":6}, {"dir":"1.1.1-beta", "test":"Drop sparse rows from a small frame", "value":2}, {"dir":"0.9.12", "test":"Fill forward missing values in 100x10k frame", "value":416}, {"dir":"1.0.0", "test":"Fill forward missing values in 100x10k frame", "value":314}, {"dir":"1.1.1-beta", "test":"Fill forward missing values in 100x10k frame", "value":18}, {"dir":"0.9.12", "test":"Get frames columns and re-create frame", "value":2307}, {"dir":"1.0.0", "test":"Get frames columns and re-create frame", "value":14}, {"dir":"1.1.1-beta", "test":"Get frames columns and re-create frame", "value":13}, {"dir":"0.9.12", "test":"Group by column and subtract group averages", "value":5223}, {"dir":"1.0.0", "test":"Group by column and subtract group averages", "value":1248}, {"dir":"1.1.1-beta", "test":"Group by column and subtract group averages", "value":1282}, {"dir":"0.9.12", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":538}, {"dir":"1.0.0", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":67}, {"dir":"1.1.1-beta", "test":"Merge 10 frames of size 1k (repeated Merge)", "value":208}, {"dir":"1.0.0", "test":"Merge 1000 ordered 1k long series (single Merge)", "value":1525}, {"dir":"1.1.1-beta", "test":"Merge 1000 ordered 1k long series (single Merge)", "value":1702}, {"dir":"1.0.0", "test":"Merge 1000 unordered 1k long series (single Merge)", "value":984}, {"dir":"1.1.1-beta", "test":"Merge 1000 unordered 1k long series (single Merge)", "value":1398}, {"dir":"0.9.12", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":4368}, {"dir":"1.0.0", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":595}, {"dir":"1.1.1-beta", "test":"Merge 3 ordered 300k long series (repeating Merge)", "value":768}, {"dir":"1.0.0", "test":"Merge 3 ordered 300k long series (single Merge)", "value":385}, {"dir":"1.1.1-beta", "test":"Merge 3 ordered 300k long series (single Merge)", "value":471}, {"dir":"0.9.12", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":4707}, {"dir":"1.0.0", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":569}, {"dir":"1.1.1-beta", "test":"Merge 3 unordered 300k long series (repeating Merge)", "value":730}, {"dir":"1.0.0", "test":"Merge 3 unordered 300k long series (single Merge)", "value":390}, {"dir":"1.1.1-beta", "test":"Merge 3 unordered 300k long series (single Merge)", "value":476}, {"dir":"0.9.12", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":15451}, {"dir":"1.0.0", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":2064}, {"dir":"1.1.1-beta", "test":"Merge 6 ordered 300k long series (repeating Merge)", "value":2729}, {"dir":"1.0.0", "test":"Merge 6 ordered 300k long series (single Merge)", "value":796}, {"dir":"1.1.1-beta", "test":"Merge 6 ordered 300k long series (single Merge)", "value":965}, {"dir":"0.9.12", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":22272}, {"dir":"1.0.0", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":2347}, {"dir":"1.1.1-beta", "test":"Merge 6 unordered 300k long series (repeating Merge)", "value":2945}, {"dir":"1.0.0", "test":"Merge 6 unordered 300k long series (single Merge)", "value":774}, {"dir":"1.1.1-beta", "test":"Merge 6 unordered 300k long series (single Merge)", "value":976}, {"dir":"0.9.12", "test":"Numerical operators on 100x10k frame and series", "value":9683}, {"dir":"1.0.0", "test":"Numerical operators on 100x10k frame and series", "value":294}, {"dir":"1.1.1-beta", "test":"Numerical operators on 100x10k frame and series", "value":281}, {"dir":"0.9.12", "test":"Numerical operators on 10x10k frame and series", "value":695}, {"dir":"1.0.0", "test":"Numerical operators on 10x10k frame and series", "value":31}, {"dir":"1.1.1-beta", "test":"Numerical operators on 10x10k frame and series", "value":32}, {"dir":"0.9.12", "test":"Numerical operators on 20x10k frame", "value":1662}, {"dir":"1.0.0", "test":"Numerical operators on 20x10k frame", "value":577}, {"dir":"1.1.1-beta", "test":"Numerical operators on 20x10k frame", "value":409}, {"dir":"0.9.12", "test":"Realign 1M series according to a key array", "value":4891}, {"dir":"1.0.0", "test":"Realign 1M series according to a key array", "value":546}, {"dir":"1.1.1-beta", "test":"Realign 1M series according to a key array", "value":666}, {"dir":"0.9.12", "test":"Resample 1M series using 100 blocks (backward)", "value":2698}, {"dir":"1.0.0", "test":"Resample 1M series using 100 blocks (backward)", "value":109}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 100 blocks (backward)", "value":118}, {"dir":"0.9.12", "test":"Resample 1M series using 100 blocks (forward)", "value":2990}, {"dir":"1.0.0", "test":"Resample 1M series using 100 blocks (forward)", "value":119}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 100 blocks (forward)", "value":131}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks", "value":2438}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks", "value":169}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks", "value":160}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks (backward)", "value":2338}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks (backward)", "value":156}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks (backward)", "value":156}, {"dir":"0.9.12", "test":"Resample 1M series using 10000 blocks (forward)", "value":2436}, {"dir":"1.0.0", "test":"Resample 1M series using 10000 blocks (forward)", "value":158}, {"dir":"1.1.1-beta", "test":"Resample 1M series using 10000 blocks (forward)", "value":155}, {"dir":"0.9.12", "test":"Shift 20x10k frame by offset 10", "value":7281}, {"dir":"1.0.0", "test":"Shift 20x10k frame by offset 10", "value":4}, {"dir":"1.1.1-beta", "test":"Shift 20x10k frame by offset 10", "value":4}, {"dir":"0.9.12", "test":"Stack values of a 1000x1000 frame", "value":1997}, {"dir":"1.0.0", "test":"Stack values of a 1000x1000 frame", "value":407}, {"dir":"1.1.1-beta", "test":"Stack values of a 1000x1000 frame", "value":561}, {"dir":"1.1.1-beta", "test":"Sum column using typed rows", "value":3}, {"dir":"1.1.1-beta", "test":"Sum column using typed rows with conversion", "value":3}, {"dir":"0.9.12", "test":"Sum column using untyped rows", "value":11368}, {"dir":"1.0.0", "test":"Sum column using untyped rows", "value":570}, {"dir":"1.1.1-beta", "test":"Sum column using untyped rows", "value":267}, {"dir":"1.0.0", "test":"Take 500k elements from a 1M element series", "value":6}, {"dir":"1.1.1-beta", "test":"Take 500k elements from a 1M element series", "value":48}, {"dir":"0.9.12", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":37}, {"dir":"1.0.0", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":16}, {"dir":"1.1.1-beta", "test":"Titanic survival rate based on gender (groupRowsBy)", "value":7}, {"dir":"1.0.0", "test":"Titanic survival rate based on gender (pivotTable)", "value":18}, {"dir":"1.1.1-beta", "test":"Titanic survival rate based on gender (pivotTable)", "value":20}\
      ]\
    }\
  ],\
  "legends": [\
    {\
      "fill": "color",\
      "title": "Performance tests",\
      "properties": {\
        "symbols": {\
          "fillOpacity": {\
            "value": 0.5\
          },\
          "stroke": {\
            "value": "transparent"\
          }\
        }\
      }\
    }\
  ],\
  "scales": [\
    {\
      "name": "cat",\
      "type": "ordinal",\
      "range": "height",\
      "padding": 0.2,\
      "domain": {\
        "data": "table",\
        "field": "data.test"\
      }\
    },\
    {\
      "name": "val",\
      "range": "width",\
      "type": "linear",\
      "round": true,\
      "nice": true,\
      "clamp": true,\
      "domainMax": 10000,\
      "domain": {\
        "data": "table",\
        "field": "data.value"\
      }\
    },\
    {\
      "name": "color",\
      "type": "ordinal",\
      "range": "category10" \
    }\
  ],\
  "axes": [\
    {\
      "type": "y",\
      "scale": "cat",\
      "tickSize": 0,\
      "tickPadding": 8\
    },\
    {\
      "type": "x",\
      "format": "1,s",\
      "scale": "val",\
      "title": "Time (ms)"\
    }\
  ],\
  "marks": [\
    {\
      "type": "group",\
      "from": {\
        "data": "table",\
        "transform": [\
          {\
            "type": "facet",\
            "keys": [\
              "data.test"\
            ]\
          }\
        ]\
      },\
      "properties": {\
        "enter": {\
          "y": {\
            "scale": "cat",\
            "field": "key"\
          },\
          "height": {\
            "scale": "cat",\
            "band": true\
          }\
        }\
      },\
      "scales": [\
        {\
          "name": "pos",\
          "type": "ordinal",\
          "range": "height",\
          "domain": {\
            "field": "data.dir"\
          }\
        }\
      ],\
      "marks": [\
        {\
          "type": "rect",\
          "properties": {\
            "enter": {\
              "y": {\
                "scale": "pos",\
                "field": "data.dir"\
              },\
              "height": {\
                "scale": "pos",\
                "mult": 0.8,\
                "band": true\
              },\
              "x": {\
                "scale": "val",\
                "field": "data.value"\
              },\
              "x2": {\
                "scale": "val",\
                "value": 0\
              },\
              "fill": {\
                "scale": "color",\
                "field": "data.dir"\
              }\
            }\
          }\
        },\
        {\
          "type": "text",\
          "properties": {\
            "enter": {\
              "y": {\
                "scale": "pos",\
                "field": "data.dir"\
              },\
              "dy": {\
                "scale": "pos",\
                "band": true,\
                "mult": 0.5\
              },\
              "x": {\
                "scale": "val",\
                "field": "data.value",\
                "offset": 4\
              },\
              "fill": {\
                "scale": "color",\
                "field": "data.dir"\
              },\
              "align": {\
                "value": "left"\
              },\
              "baseline": {\
                "value": "middle"\
              },\
              "text": {\
                "field": "data.value"\
              }\
            }\
          }\
        }\
      ]\
    }\
  ]\
}'));
</script>
</body>
</html>